import { request } from "@/utils/service"

/** 大模型简单会话 */
export function simpleDialog(data) {
  return request({
    url: "/backend/agi/simple",
    method: "post",
    data
  })
}
export function getQaList(data) {
  return request({
    url: "/backend/suggest/list",
    method: "post",
    data
  })
}
// 新增问题
export function addQa(data) {
  return request({
    url: "/backend/suggest/save",
    method: "post",
    data
  })
}
export function delQa(data) {
  return request({
    url: "/backend/suggest/delete",
    method: "post",
    data
  })
}
// 执行一下
export function executeSql(data) {
  return request({
    url: "/backend/db/executeSql",
    method: "post",
    data
  })
}
// 数据库列表
export function getDataList(data) {
  return request({
    url: "/backend/table/list",
    method: "post",
    data
  })
}
// 新增数据表
export function addSqlTable(data) {
  return request({
    url: "/backend/table/save",
    method: "post",
    data
  })
}
// 数据表删除
export function delSqlTable(data) {
  return request({
    url: "/backend/table/delete",
    method: "post",
    data
  })
}
// 数据库名称列表
export function getDbNameList(data) {
  return request({
    url: "/backend/dbinfo/listAll",
    method: "post",
    data
  })
}
// 数据库连接
export function dbconnect(data) {
  return request({
    url: "/backend/dbcon/save",
    method: "post",
    data
  })
}
// 数据库重连接
export function dbreconnect(data) {
  return request({
    url: "/backend/dbcon/reconnect",
    method: "post",
    data
  })
}

// 数据库编辑
export function updateConnect(data) {
  return request({
    url: "/backend/dbcon/update",
    method: "post",
    data
  })
}

// 数据库连接列表
export function getDbconnect(data) {
  return request({
    url: "/backend/dbcon/listAll",
    method: "post",
    data
  })
}
//  数据库连接删除
export function delDbconnect(data) {
  return request({
    url: "/backend/dbcon/delete",
    method: "post",
    data
  })
}
// 向量库链接
export function initdb(data) {
  return request({
    url: "/backend/vs/initdb",
    method: "post",
    data
  })
}
